package com.ad2campaign.engine.db.rowmapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.ad2campaign.engine.db.model.Node;

public class NodeMapper implements RowMapper<Node> 
{

	@Override
	public Node mapRow(ResultSet rs, int rowNum) throws SQLException 
	{
		Node node = new Node();
		node.setHost(rs.getString("host"));
		node.setPort(rs.getInt("port"));
		node.setProtocol(rs.getString("protocol"));
		return node;
  	}

}
